home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / unix / volume4 / uemacs / part6 < prev    next >
Encoding:
Internet Message Format  |  1986-11-30  |  36.7 KB

  1. From: decvax!minow (Martin Minow)
  2. Subject: MicroEmacs (Part 6 of 6)
  3. Newsgroups: mod.sources
  4. Approved: jpn@panda.UUCP
  5.  
  6. Mod.sources:  Volume 4, Issue 73
  7. Submitted by: decvax!minow (Martin Minow)
  8.  
  9. #! /bin/sh
  10. # This is a shell archive, meaning:
  11. # 1. Remove everything above the #! /bin/sh line.
  12. # 2. Save the resulting text in a file.
  13. # 3. Execute the file with /bin/sh (not csh) to create the files:
  14. #    uemacs.tex
  15. # This archive created: Sun Apr 13 11:18:26 1986
  16. export PATH; PATH=/bin:$PATH
  17. echo shar: extracting "'uemacs.tex'" '(36749 characters)'
  18. if test -f 'uemacs.tex'
  19. then
  20.     echo shar: will not over-write existing file "'uemacs.tex'"
  21. else
  22. cat << \SHAR_EOF > 'uemacs.tex'
  23. %%
  24. %%    W A R N I N G
  25. %%
  26. %% This file is quite out of date.  It is, however, the best we have.
  27. %% Build the documentation using LaTeX.
  28. %%
  29. \newcounter{Version}
  30. \setcounter{Version}{28}        % update at each new release
  31. \newlength{\Cmdwidth}            % used to indent command lists
  32. \setlength{\Cmdwidth}{8em}        % set by eyeball
  33. \documentstyle[twoside,12pt]{article}
  34. \pagestyle{headings}
  35. %\makeindex                % someday
  36. \load{\footnotesize}{\sf}        % Load smaller
  37. \load{\small}{\sf}            % Sans-Serif fonts
  38. \hyphenation{Mi-cro-EMACS}
  39. \renewcommand{\labelitemii}{$\bullet$}    % Second-level \item
  40. \parskip 3pt plus 2pt minus 1pt        % this looks better than
  41. \parindent 20pt                % the standard style
  42. %
  43. % Define textual macros:
  44. % \_            not correct in standard TeX for big fonts
  45. %
  46. % The following are used to switch fonts for special Uemacs terms.
  47. %
  48. % \Name{xxx}        Command name (changes font to Sans-Serif)
  49. % \META{}        META in running text
  50. % \CONTROL{}        CONTROL in running text
  51. % \Text{xxx}        Display text (changes font to typewriter)
  52. % \Nameitem{xxx}    \item[] if contents are command names.
  53. %            (Will put name in index eventually)
  54. %
  55. \renewcommand{\_}{{\tt \char95}}
  56. \newcommand{\Text}[1]{{\tt #1}}
  57. \newcommand{\Name}[1]{{\sf #1}}
  58. \newcommand{\META}{{\underline{\sc meta}}}
  59. \newcommand{\CONTROL}{{\underline{\sc control}}}
  60. \newcommand{\Nameitem}[1]{\item [\Name{#1}]}
  61. %
  62. % Environment for command lists.  Like \begin{description}, but
  63. % with special indentation.  Usage:
  64. % \begin{cmdlist}
  65. %   \Nameitem{xxx} Explanation of item xxx.
  66. %   \Nameitem{yyy} Explanation of item yyy.
  67. % \end{cmdlist}
  68. %
  69. \newenvironment{cmdlist}{%
  70.   \list{}{%                    % homemade description envt.
  71.     \setlength{\rightmargin}{0em}        % on either side.
  72.     \setlength{\labelwidth}{\Cmdwidth}    % \item indentation
  73.     \setlength{\labelsep}{1em}            % between item and text
  74.     \setlength{\leftmargin}{\labelwidth}    % Indent by indentation
  75.     \addtolength{\leftmargin}{\labelsep}    %   + a little space
  76.     \renewcommand{\makelabel}[1]{##1\hfill}    % Add \index command someday
  77.   }
  78. }{\endlist}
  79.  
  80. \begin{document}
  81. \author{\
  82. David G. Conroy \\
  83. Digital Equipment Corporation \\
  84. 146 Main St. \\
  85. Maynard, MA 01754
  86. }
  87. \title{\
  88.   MicroEmacs \\[3ex]
  89.   {\large Reasonable Editing } \\
  90.   {\large on } \\
  91.   {\large Tiny Computers } \\
  92. }
  93. \maketitle
  94. \abstract{
  95. This document describes MicroEMACS,
  96. a public-domain display editor, loosly base on the EMACS display editor
  97. written by Richard Stallman at MIT. It is intended as a reference manual
  98. for users already familiar with EMACS.
  99.  
  100. This is MicroEmacs Version \arabic{Version}.
  101. }
  102. \vfill
  103. \vfill            % Set this 2/3 down on the page.
  104. \begin{quotation}
  105. This document was produced using the \LaTeX{} document
  106. preparation system developed by Leslie
  107. Lamport.  All page composition and make-up was performed
  108. by \TeX,\footnote{\TeX{} is a registered trademark of the
  109. American Mathematical Society.} the typesetting system developed by
  110. Donald E. Knuth at Stanford University.
  111. \end{quotation}
  112. \vfill
  113. \newpage
  114. \tableofcontents
  115. \newpage
  116. \section{Introduction}
  117. This document describes MicroEMACS, a
  118. public-domain display editor, loosely based on EMACS, that runs on little
  119. computers.
  120.  
  121. We call it Micro{\em EMACS\/} to emphasize the fact that
  122. most of the commands are very similar to, if not identical to,
  123. fundamental mode EMACS commands (actually, it implements a set of
  124. rebindings used by a group of users at Digital).
  125.  
  126. We call it {\em Micro\/}EMACS to emphasize the fact that it is
  127. but a shadow of full EMACS. No attempt has been made to make MicroEMACS
  128. wildly
  129. customizable (without writing code), or to have extensive online documentation.
  130. All of this sophistication was thrown away right at the start, because
  131. it was important that MicroEMACS run on little computers.
  132. In all fairness, is should be stated here and now that the most popular
  133. small computer these days is the MicroVAX!
  134. \section{Some Basic Concepts}
  135. This section describes a number of basic concepts,
  136. which will be used again and again in the following descriptions.
  137. Most of it should be familiar to EMACS users.
  138. New users are advised not to get stuck reading this section,
  139. because most of the information will become clear the first time you
  140. play with the editor on a computer.
  141. \subsection{Screen Layout}
  142. MicroEMACS divides the screen into two areas. The very last
  143. line on the screen, which is used to display messages and
  144. ask one line questions, is called the echo line. Typing in the echo line
  145. is like typing commands to the operating system. More details later.
  146.  
  147. The remainer of the screen is filled with text windows.
  148. When MicroEMACS is first started, there is only one text window, and it
  149. fills the screen. Windows can be created, deleted, and adjusted in
  150. size using MicroEMACS commands.
  151. \subsection{Mode Lines}
  152. The last line of a window (the line, usually in reverse video,
  153. that starts with \Text{MicroEMACS}) is
  154. the mode line for the window.
  155. It contains information about what is being displayed in the
  156. window. Mode lines separate windows from each other and from the
  157. echo line.
  158.  
  159. Three important bits of information are displayed in the mode line.
  160. these are the {\em buffer name\/}, the {\em file name\/},
  161. and the {\em buffer changed flag\/}.
  162.  
  163. A window is always displaying a buffer. The name of the buffer being
  164. displayed in the window is shown in the mode line, right after the
  165. \Text{MicroEMACS}.
  166.  
  167. A buffer may have a file associated with it.
  168. Usually this is the last file read into or written from the
  169. buffer. If a file is associated with the buffer, the name of the
  170. file is displayed in the mode line, prefixed by \Text{File:}.
  171. On operating systems in which file names are case insensitive
  172. (for example, VMS) the file name will always be in lower case.
  173.  
  174. MicroEMACS knows if a buffer has been changed since it was last
  175. written to its associated file. It informs you of this fact by displaying
  176. a \verb+*+ in the mode line immediately to the left of the \Text{MicroEMACS}
  177. string.
  178. \subsection{Keyboard Conventions}
  179. Internally, MicroEMACS represents keyboard characters in a special
  180. 10 bit code. This code consists of 8 bits of character data (ASCII plus
  181. whatever characters your terminal puts in the right side graphics set), and
  182. 2 flags, the \CONTROL{} flag and the \META{} flag.
  183. All 4 combinations of the two flags are possible.
  184.  
  185. This manual represents 10 bit characters in a standard way. If you
  186. have a character \Text{A}, then that character with
  187. the \CONTROL{} bit set is
  188. written as \Name{C-A}. That character with the
  189. \META{} bit set is written as \Name{M-A}.
  190. If both bits are set, it is written as \Name{C-M-A}.
  191.  
  192. Terminals (usually) cannot deal directly deal with the 10 bit
  193. character set.
  194. Characters with the flag bits set are entered by prefixing the
  195. desired character with another character.
  196. To get a character with the \CONTROL{} bit set,
  197. prefix the character with \Text{Control-}\verb+^+ (the
  198. word \Text{Control} here, and in the next few examples, means the key marked
  199. \Text{Control} or \Text{CTRL} on the ASCII keyboard).
  200. To get a character with the
  201. \META{} bit set, prefix the character
  202. with \Text{Control-}\verb+[+, \Text{Escape}, or \Text{ESC}.
  203. To get a character with the \CONTROL{}
  204. and \META{} bits set, prefix the character
  205. with \Text{Control-}\verb+\+.
  206.  
  207. Those of you who understand ASCII are probably asking what you get
  208. if you prefix a character with \Text{Control-}\verb+]+.
  209. This character is not a prefix;
  210. it is reserved for future use as an ``exit from recursive editing level''
  211. command.
  212.  
  213. CONTROL characters are very important, so there is a shorthand way
  214. of typing them.
  215. Characters between \Text{Control-@} and \Text{Control-Z} are mapped
  216. to the characters \Text{@} through \Text{Z} with the \CONTROL{} bit set.
  217. Characters between
  218. \Text{Control-a} and \Text{Control-z} are mapped to
  219. the characters \Text{A} through \Text{Z}
  220. with the \CONTROL{} bit set.
  221. Most of the time \Text{Control-X} and \Name{C-X} are the same.
  222. \subsubsection{The VT100 Keyboard}
  223. MicroEMACS understands the arrow keys and the keypad on VT100
  224. style keyboards. Only the PF1 through PF4 keys on the keypad have any
  225. special meaning; the digits,
  226. the \Text{-} key, and the \Text{,} key are treated just
  227. like the non keypad versions of those characters.
  228. The \Text{Enter} key is treated
  229. exactly like the \Text{Return} key.
  230.  
  231. The arrow keys may be used for moving around. The left arrow is the
  232. same as  \Name{C-B},
  233. the right arrow is the same as \Name{C-F}, the up arrow is the same
  234. as \Name{C-P}, and the down arrow is the same as \Name{C-N}.
  235.  
  236. The four function keys are command keys.
  237. The \Text{PF1} key is the same as \Name{M-X}
  238. (the \Text{PF1} key is where the \Text{Gold} key normally
  239. resides on DEC products, so
  240. it is a good choice for the key that asks for extended commands).
  241. The \Text{PF2} key is the same as \Name{C-Q} (quote character).
  242. The \Text{PF3} key is the same as \Name{C-S} (search forward).
  243. The \Text{PF4} key is the same as \Name{C-R} (search reverse). 
  244. These assignments have not been proven optimal, so they may get changed
  245. in the future.
  246. \subsubsection{The LK201 Keyboard}
  247. The escape key, used in all \META{} commands, is very poorly placed on
  248. the LK201 keyboard. To make typing a bit easier, the grave accent is also
  249. considered to be a \META{} prefix on the LK201;
  250. the grave accent is right where you expect the escape key to be located.
  251. A grave accent must be quoted to exter it into the text.
  252.  
  253. The arrow keys and all of the keys on the keypad
  254. work just like they do on the VT100 keyboard.
  255.  
  256. The keys immediately above the arrow keys try to do what their name
  257. implies. \Text{Next Screen} is the same as \Name{C-V}.
  258. \Text{Prev Screen} is the same as
  259. \Name{M-V}. \Text{Select} is the same as \Name{C-@} (set mark).
  260. \Text{Remove} is the same as
  261. \Name{C-W} (kill region). \Text{Insert here}
  262. is the same as \Name{C-Y} (yank from killbuffer).
  263. \Text{Find} is the same as \Name{C-S} (search forward).
  264.  
  265. The \Text{F6}, \Text{F7}, \Text{F8},
  266. \Text{F9}, \Text{F10}, and \Text{F14} keys are unused.
  267. The \Text{F11} is escape, which is a \META{} prefix key.
  268. The \Text{F12} key is backspace. The \Text{F13} key is linefeed.
  269.  
  270. The \Text{Help} key is unused. The \Text{Do}
  271. key is the same as \Name{C-X E} (execute keyboard macro).
  272.  
  273. The \Text{F17} key is the same as \Name{C-X P} (previous window).
  274. The \Text{F18} key is the same as \Name{C-X N} (next window).
  275. The \Text{F19} key is the same as \Name{C-X Z} (grow window).
  276. The \Text{F20} key is the same as \Name{C-X C-Z} (shrink window).
  277. \subsection{The Echo Line}
  278. The echo line has two purposes; displaying messages and asking one
  279. line questions.
  280.  
  281. Two types of messages are displayed in the echo line.
  282. Informational messages tell you something useful, but do not imply in any
  283. way that something is wrong. These messages are always enclosed in square
  284. brackets (\verb+[+ and \verb+]+).
  285. Error messages indicate that something has
  286. prevented a command from being executed. They are never enclosed in square
  287. brackets, and will be accompanied by a beep from the terminal's bell if
  288. the sound of the bell is not too obnoxious.
  289.  
  290. The echo line is normally cleared by the next keystroke.
  291. However, there is a special hack to clear the echo line without
  292. doing anything else. If you type a \Text{Space} and there is a message in the
  293. echo line, then the echo line is cleared, and the \Text{Space} does not
  294. insert.
  295.  
  296. The echo line is also used for asking and answering questions.
  297. After the
  298. prompt, you can type any characters you like. The reply is always
  299. terminated by a \Text{Return}. Before you commit to the reply, you can delete
  300. characters by typing \Text{Backspace} or \Text{Rubout}, and you can delete the
  301. entire line by typing \Text{Control-U}.
  302. You can also abort the command in progress by typing \Text{Control-G}.
  303. Command processors are written to ask all questions before doing nasty
  304. things, so that you will never do damage by aborting a command.
  305. \subsection{Command Arguments}
  306. All commands can be given a numeric argument. Most commands use this
  307. argument as a repeat count. Commands can tell if an argument has been
  308. supplied, and will use a default argument if no user argument is present.
  309. Usually, the default argument is \Text{1}.
  310.  
  311. A \Name{C-U} always introduces an argument.
  312.  
  313. If a numeric argument is just a string of \Name{C-U} characters, then the
  314. value of the argument is
  315. $4^{(number of \Name{C-U} characters)}$.
  316. Therefore \Name{C-U} is 4, \Name{C-U C-U} is 16,
  317. \Name{C-U C-U C-U} is 256, and so on.
  318. Some commands
  319. care if an argument is present, but don't look at its value; the \Name{C-U}
  320. character is a good way to say ``here is an argument''.
  321.  
  322. If there is a signed decimal number after the string of
  323. \Name{C-U} characters it specifies the value of the argument. In this case
  324. the number of \Name{C-U} characters does not matter. An argument of 10 can be
  325. represented by \Name{C-U 10},
  326. \Name{C-U C-U 10}, or even \Name{C-U C-U C-U C-U 10}.
  327. \subsection{Dot, Mark, and the Region}
  328. Most editing commands act on the character or characters surrounding
  329. the current location in the current buffer. The thing that marks the current
  330. location is always called ``dot''. The ``dot'' always points between two
  331. characters. This isn't the way that the cursor works on most display terminals,
  332. so, by convention, dot is always immediately to the left of the character
  333. on which the hardware cursor is placed.
  334.  
  335. There is also a second remembered position in the buffer, called the
  336. mark. There are commands that set the value of mark.
  337.  
  338. Some commands act on a block of text called the region. The region is
  339. all of the characters between dot and mark. The relative position of dot
  340. and mark do not matter.
  341. \subsection{Word Syntax}
  342. Some MicroEMACS commands manipulate words. In full EMACS the characters
  343. that make up words can be changed by the user. In MicroEMACS, they are
  344. fixed, and include the upper and lower case letters, the dollar sign
  345. \verb+$+ and the underline \verb+_+. This set of characters is intended more
  346. for editing programs, but the word commands still work reasonably
  347. when editing text.
  348. \section{Quitting}
  349. When you finish editing, you have to quit.
  350. MicroEMACS never writes out a file because it thinks that this
  351. is the right thing to do. However, it will attempt to protect you from
  352. forgetting to do so.
  353. \begin{cmdlist}
  354. %% This was used to test the indentation
  355. %% \item[Foobar]
  356. %% \verb+\labelwidth    = + \\
  357. %%    \framebox[\labelwidth]{*}    \\
  358. %% \verb+\leftmargin    = + \\
  359. %%    \framebox[\leftmargin]{*}    \\
  360. %% \verb+\labelsep      = + \\
  361. %%    \framebox[\labelsep]{*}    \\
  362. %% \verb+\listparindent = + \\
  363. %%    \framebox[\listparindent]{*}    \\
  364. \Nameitem{C-X C-C}
  365. This is the basic quit command. MicroEMACS exits, returning
  366. control to the shell. If there are any changed buffers that have not been
  367. written out, it will ask for permission to quit. Supplying an argument to
  368. \Name{C-X C-C} makes the command quit unconditionally, without asking for
  369. confirmation. The value of the argument is not important.
  370. \Nameitem{C-C}
  371. This command suspends the execution of MicroEMACS, and runs
  372. a command interpreter in a subjob. When the subjob terminates, the screen
  373. is cleared and repainted.
  374.  
  375. The \Name{C-C} command is the same as
  376. \Name{C-X C-C} if the operating system cannot
  377. create command interpreters in subjobs.
  378.  
  379. Subjobs are implemented in VAX/VMS and MS-DOS. Users of CP/M-86 are
  380. out of luck.
  381. \Nameitem{C-Z}
  382. This is a slightly more elabourate quit command.
  383. If the current buffer has been changed, \Name{C-Z} saves the contents of
  384. the buffer in the associated file (it gets an error if there is no
  385. associated file). If the current buffer has not been changed, \Name{C-Z}
  386. acts like \Name{C-C}.
  387. \end{cmdlist}
  388. \section{Moving Around}
  389. \begin{cmdlist}
  390.  \item[Foobar]
  391.  \verb+\labelwidth    = + \\
  392.     \framebox[\labelwidth]{*}    \\
  393.  \verb+\leftmargin    = + \\
  394.     \framebox[\leftmargin]{*}    \\
  395.  \verb+\labelsep      = + \\
  396.     \framebox[\labelsep]{*}    \\
  397.  \verb+\listparindent = + \\
  398.     \framebox[\listparindent]{*}    \\
  399.  
  400. \Nameitem{C-A}
  401. Move to the beginning of the current line. Any argument
  402. is ignored. Always succeeds.
  403. \Nameitem{C-B}
  404. Move backwards character by character. The number of characters
  405. to move is specified by the argument. If no argument is given it moves
  406. backwards by 1 character. A newline counts as a single character. Fails
  407. if executed at the beginning of the buffer.
  408. \Nameitem{C-E}
  409. Move to the end of the current line. Any argument is ignored.
  410. Always succeeds.
  411. \Nameitem{C-F}
  412. Move forwards character by character. The number of characters
  413. to move is specified by the argument. If no argument is given it moves
  414. forwards by 1 character. A newline counts as a single character. Fails
  415. if executed at the end of the buffer.
  416. \Nameitem{C-N}
  417. Move forward by lines. Attempt to preserve the current horizontal
  418. position. The number of lines to move is specified by the argument. If no
  419. argument is given it moves by 1 line. Fails if executed at the end of the
  420. buffer.
  421. \Nameitem{C-P}
  422. Move backwards by lines. Attempt to preserve the current horizontal
  423. position. The number of lines to move is specified by the argument. If no
  424. argument is given it moves by 1 line. Fails if executed at the beginning of
  425. the buffer.
  426. \Nameitem{C-V}
  427. Move forward by pages. If an argument is given, it specifies the
  428. number of lines to move. If no argument is given, the size of the window
  429. less 2 lines (for overlap) is used. If the window is too small to allow
  430. 2 lines of overlap, it moves by 1 line. Dot is set to the first character
  431. of the first line on the new screen.
  432.  
  433. There is a compile time option that makes this command take an argument
  434. in screenfulls instead of lines. Look in \Text{ed.h} for the gory details.
  435. \Nameitem{M-V}
  436. Move backwards by pages. If an argument is given, it specifies
  437. the number of lines to move. If no argument is given, the size of the window
  438. less 2 lines (for overlap) is used. If the window is too small to allow
  439. 2 lines of overlap, it moves by 1 line. Dot is set to the first character
  440. of the first line on the new screen.
  441.  
  442. There is a compile time option that makes this command take an argument
  443. in screenfulls instead of lines. Look in \Text{ed.h} for the gory details.
  444. \Nameitem{M-\verb+<+}
  445. Move to the beginning of the buffer. Any argument is ignored.
  446. Dot is set to the first character of the first line in the buffer.
  447. \Nameitem{M-\verb+>+}
  448. Move to the end of the buffer. Any argument is ignored. Dot is
  449. set to the first character in the fake line immediately after the buffer.
  450. The window is set to display dot near the center of the screen.
  451. \end{cmdlist}
  452. \section{Inserting}
  453. All characters between hexadecimal 20 and 7E (blank through tilde),
  454. and all characters between hexadecimal A0 and FE (right hand graphics)
  455. are self inserting. They are inserted into the buffer at the current
  456. location of dot, and dot moves 1 character to the right.
  457.  
  458. Any self inserting character can be given an argument. This argument is
  459. used as a repeat count, and the character is inserted that number of
  460. times. This is useful for creating lines of \verb+*+ characters of a specific
  461. length, and other pseudo-graphic things.
  462. \begin{cmdlist}
  463.  \item[Foobar]
  464.  \verb+\labelwidth    = + \\
  465.     \framebox[\labelwidth]{*}    \\
  466.  \verb+\leftmargin    = + \\
  467.     \framebox[\leftmargin]{*}    \\
  468.  \verb+\labelsep      = + \\
  469.     \framebox[\labelsep]{*}    \\
  470.  \verb+\listparindent = + \\
  471.     \framebox[\listparindent]{*}    \\
  472.  
  473. \Nameitem{C-M}
  474. The return key works just like you would expect it to work;
  475. it inserts a newline character. Lines can be split by moving into the middle
  476. of the line, and inserting a newline.
  477.  
  478. If dot is positioned at end of line,
  479. and the line after the current line is a blank line,
  480. then \Name{C-M} does not insert a newline,
  481. but simply moves to the first position
  482. on the following line. This lets you create a block of blank space (perhaps
  483. using \Name{C-O}) and then type text into it.
  484. \Nameitem{C-O}
  485. This command creates blank lines. To be precise, it inserts
  486. a newline by doing a \Name{C-B},
  487. and then backs up by doing a \Name{C-B}. If dot is at
  488. the start of a line, this will leave dot sitting on the first character
  489. of a new blank line.
  490. \Nameitem{C-Q, M-Q}
  491. Characters which are special to MicroEMACS can be inserted by
  492. using this command.
  493. The next character after the \Name{C-Q} or \Name{M-Q} is stripped of
  494. any special meaning. It is simply inserted into the current buffer.
  495. Any argument specified on the \Name{C-Q}
  496. or \Name{M-Q} command is used as the insert
  497. repeat count.
  498.  
  499. The\Name{C-Q} form of the command is the easiest to use. However, some terminals
  500. demand that MicroEMACS perform XON/XOFF processing. If this is the case,
  501. the \Name{C-Q} will be eaten by low level terminal support,
  502. and will not be usable
  503. as a command. The \Name{M-Q} form can always be used.
  504. \end{cmdlist}
  505. \section{Deleting and Killing}
  506. There are two general classes of commands that remove text from the
  507. buffer; delete commands and kill commands.
  508. Delete commands remove text from the buffer, and throw it away.
  509. Kill commands remove text from the buffer, but save the text in a special
  510. place called the kill buffer. Kill commands clear the kill buffer only
  511. if the previous command was not a kill command. Multiple kill commands
  512. executed in a row append text to the kill buffer.
  513. \begin{cmdlist}
  514.  \item[Foobar]
  515.  \verb+\labelwidth    = + \\
  516.     \framebox[\labelwidth]{*}    \\
  517.  \verb+\leftmargin    = + \\
  518.     \framebox[\leftmargin]{*}    \\
  519.  \verb+\labelsep      = + \\
  520.     \framebox[\labelsep]{*}    \\
  521.  \verb+\listparindent = + \\
  522.     \framebox[\listparindent]{*}    \\
  523.  
  524. \Nameitem{C-D}
  525. Delete characters to the right of dot. If an argument is
  526. specified that number of characters is deleted. If no argument is specified
  527. then 1 character is deleted. In addition, if an argument is specified,
  528. then the command kills the text instead of deleting it. It fails if
  529. there are not enough characters to delete between dot and the end of
  530. the buffer.
  531. \Nameitem{Rubout}
  532. Delete characters to the left of dot. If an argument is
  533. specified then that number of characters is deleted. If no argument is
  534. specified then 1 character is deleted. In addition, if an argument is
  535. specified, the rubout command kills the text instead of deleting it.
  536. The command fails if there is not enough text between the start of the
  537. buffer and dot.
  538. \Nameitem{C-K}
  539. This is the basic killing command. If there is no argument
  540. it kills from dot to the end of the line, unless dot is at the
  541. end of line, when it kills the end of line.
  542. If a positive argument is specified, \Name{C-K} kills that many lines,
  543. including the newlines.
  544. If an argument of 0 is specified, \Name{C-K} kills from the start of the current
  545. line to dot.
  546. Finally, if a negative argument is specified, \Name{C-K} kills backwards over
  547. abs(arg) newlines. This command fails if there arn't enough characters
  548. left in the buffer to be killed.
  549. \Nameitem{C-W}
  550. Kill all of the text enclosed in the region. Any argument
  551. is ignored.
  552. \Nameitem{C-Y}
  553. Insert the text in the kill buffer into the current buffer
  554. at dot. If an argument is specified, it specifies the number of times
  555. the text is yanked. If no argument is specified, yank the text back
  556. once. Dot is advanced over the inserted text, as if the text had
  557. been typed in normally. Always succeeds.
  558. \Nameitem{C-X C-O}
  559. ... Yes? ...
  560. \end{cmdlist}
  561. \section{Words}
  562. \begin{cmdlist}
  563. \Nameitem{M-B}
  564. The backward word command moves dot backward by words, stopping
  565. on the first character of the word. If an argument is specified, it is the
  566. number of words over which to move. The default argument is 1.
  567. \Nameitem{M-C}
  568. This command moves forward over a word, converting all characters
  569. in the word to lower case except the first one, which is converted to
  570. upper case. If an argument is supplied, it must be positive, and it specifies
  571. the number of words over which to move.
  572. \Nameitem{M-D}
  573. The delete word command moves dot forward by words, and kills
  574. any characters over which it moves. If an argument is specified, it is the
  575. number of words over which to move. The default argument is 1.
  576. \Nameitem{M-F}
  577. The forward word command moves dot forward by words, stopping
  578. on the first non-word character. If an argument is specified, it is the
  579. number of words over which to move. The default argument is 1.
  580. \Nameitem{M-L}
  581. This command moves forward over a word, converting it to lower
  582. case. If an argument is supplied, it must be positive, and it specifies the
  583. number of words over which to move.
  584. \Nameitem{C-M-H}
  585. The backward delete word command moves backward by words, stopping
  586. on the first character of the word, and killing as it moves. If an argument
  587. is present, it specifies the number of words over which to move. The
  588. default argument is 1.
  589. \Nameitem{M-Rubout}
  590. This command is the same as \Name{C-M-H}. It exists only to preserve the
  591. symmetry between the word commands and the character commands (both backspace
  592. and rubout are backward delete character).
  593. \Nameitem{M-U}
  594. This command mobes forward over a word, converting it to upper
  595. case. If an argument is supplied, it must be positive, and it specifies the
  596. number of words over which to move.
  597. \end{cmdlist}
  598. \section{Case Conversion}
  599. In addition to the word mode case conversion commands, MicroEMACS has
  600. commands to modify the case of large blocks of text. These commands should
  601. be used with caution because they cause major damage to (potentially)
  602. large areas of the buffer.
  603. \begin{cmdlist}
  604. \Nameitem{C-X C-L}
  605. The lowercase region command converts all of the characters
  606. between dot and mark into lower case.
  607. \Nameitem{C-X C-U}
  608. The uppercase region command converts all of the characters
  609. between dot and mark into upper case.
  610. \end{cmdlist}
  611. \section{Searching}
  612. Search commands look though the buffer, in either the forward or the reverse
  613. direction, looking for text that matches a search pattern. Search commands
  614. prompt for the search pattern in the echo line. The search pattern used
  615. by the last search command is remembered, and displayed in the prompt. If
  616. you want to use this pattern again, just hit carriage return at the
  617. prompt.
  618.  
  619. In search strings, all characters stand for themselves, and all searches
  620. are case insensitive. There are no regular expression searches, and there
  621. probably should be. The newline characters at the ends of the lines are
  622. considered to have hexadecimal value 0A, and can be matched by a linefeed
  623. in a search string.
  624. \begin{cmdlist}
  625. \Nameitem{C-S, M-S}
  626. Search forward, from the current location, toward the end of
  627. the buffer. If found, dot is positioned after the matched text. If the
  628. text is not found, dot does not move.
  629.  
  630. The \Name{C-S} form of the command is not usable if the terminal being used
  631. required XON/XOFF support. In fact, if you use this format of the command
  632. on such a terminal, it will hang until you type \Name{C-Q}.
  633. \Nameitem{C-R, M-R}
  634. Search reverse, from the current location, toward the front of
  635. the buffer. If found, dot is positionedat the first character of the
  636. matched text. If the text is not found, dot does not move.
  637. \end{cmdlist}
  638. \section{Files}
  639. \begin{cmdlist}
  640. \Nameitem{C-X C-F}
  641. This command prompts in the echo line for a file name,
  642. which becomes the new associated file name for the current buffer.
  643. \Nameitem{C-X C-R}
  644. This command prompts in the echo line for a file name,
  645. then it deletes all of the text in the current buffer and reads in the
  646. file. The associated file name is set to the name of the file just
  647. read. The number of lines read is displayed in the echo line.
  648. \Nameitem{C-X C-S}
  649. This command writes the contents of the current buffer
  650. to its associated file. The ``changed'' flag for the current buffer is
  651. reset. It is an error to use this command in a buffer which lacks
  652. an associated file name. This command is a no-operation if the
  653. buffer has not been changed since the last write.
  654. \Nameitem{C-X C-V}
  655. This command selects a file for editing. It prompts for
  656. a file name in the echo line. It then looks through all of the buffers
  657. for a buffer whose associated file name is the same as the file being
  658. selected. If a buffer is found, it just switches to that buffer.
  659. Otherwise it crerates a new buffer, (fabricating a name from the last
  660. part of the new file name), reads the file into it, and switches to the
  661. buffer.
  662.  
  663. If the desired new buffer name is not unique (perhaps you tried to
  664. visit a file in some other directory with the same name as a file already
  665. read in) the command will prompt for a new buffer name. You can either
  666. supply a buffer name, or just type newline to overwrite the old
  667. buffer.
  668. \Nameitem{C-X C-W}
  669. This command prompts in the echo line for a file name,
  670. then it writes the contents of the current buffer to that file. The
  671. ``changed'' flag for the current buffer is reset, and the supplied file
  672. name becomes the associated file name for the current buffer.
  673. \end{cmdlist}
  674. \section{Keyboard Macros}
  675. Keyboard macros simplify a large class of repitious editing tasks.
  676. The basic idea is simple. A set of keystrokes can be collected into a
  677. group, and then the group may be replayed any number of times.
  678.  
  679. There is only 1 keyboard macro. It would (perhaps) be nice if you could
  680. have more than 1 of them.
  681. \begin{cmdlist}
  682. \Nameitem{C-X (}
  683. This command starts the collection of a keyboard macro. All
  684. keystrokes up to the next \Name{C-X )} will be gathered up,
  685. and may be replayed by
  686. the execute keyboard macro command.
  687. \Nameitem{C-X )}
  688. This command stops the collection of a keyboard macro.
  689. \Nameitem{C-X E}
  690. The execute keyboard macro command replays the current keyboard
  691. macro. If an argument is present, it specifies the number of times the macro
  692. should be executed. If no argument is present, it runs the macro once.
  693. \end{cmdlist}
  694. \section{Buffer Management}
  695. Previous sections have made references to the text in ``the buffer'',
  696. which implied that there is only one buffer. This is not true; MicroEMACS
  697. allows any number of buffers, memory space permitting.
  698.  
  699. Each buffer has its own buffer name (a 16 character string),
  700. and optional associated file name,
  701. and a block of text. A value of dot and mark is also associated with
  702. any buffer that is not currently being displayed. This remembered value
  703. of dot and mark makes a buffer come back in approximately the same state
  704. as it was when it was hidden.
  705.  
  706. Also associated with each buffer is a changed flag. This flag is set
  707. when the text in the buffer is modified, and reset when the text in the
  708. buffer is written out to its associated file. MicroEMACS will always ask
  709. for confirmation before executing a command that would cause changed
  710. text to be lost.
  711. \begin{cmdlist}
  712. \Nameitem{C-X C-B}
  713. Create a pop-up window on the screen, and display it in
  714. the name, size (in characters), associated file name, and changed flag
  715. of all buffers. This command works by creating a special buffer which
  716. contains the text of the display, and then selecting it in a window. You
  717. can switch into this window if you like. You can even edit the text.
  718. MicroEMACS makes no attempt to keep a buffer list which is on the screen
  719. updated as other buffers are edited; however, another \Name{C-X C-B} command
  720. will cause the display to be updated in place.
  721. \Nameitem{C-X B}
  722. This command prompts for a buffer name, and then switches
  723. the buffer being displayed in the current window to that buffer. The
  724. buffer will be created if it does not exist.
  725. \Nameitem{C-X K}
  726. This command prompts for a buffer name, and then destroys
  727. the buffer with that name. It will ask for permission to destroy the
  728. buffer if the text has been changed since it was written to the associated
  729. file. You cannot delete a buffer that is being displayed.
  730. \end{cmdlist}
  731. \section{Window Management}
  732. MicroEMACS lets you have multiple windows on the screen.
  733. Each window has its own mode line, its own value of dot and mark,
  734. and its own associated buffer. If you have a buffer displayed in more
  735. that one window and you edit a line, it is updated in all windows.
  736. \begin{cmdlist}
  737. \Nameitem{C-L}
  738. This command clears the screen, and completely redisplays all
  739. of the text is all of the windows. It is useful if a line error has garbaged
  740. your screen. If you give \Name{C-L} and argument
  741. (any value will do) it will re-center
  742. dot in the current window as well.
  743. \Nameitem{C-X 2}
  744. This is the basic window making command. The current window
  745. is split in two. Each window is displaying the same buffer, and has
  746. the same value of dot and mark. The window must be at least three lines
  747. high, otherwise there isn't enough room for two text lines and the
  748. new mode line. Any argument is ignored.
  749.  
  750. After the window is created, it is usually switched to a private
  751. buffer using \Name{C-X B} or (perhaps more often) \Name{C-X C-V}.
  752. Note that because
  753. both windows are displaying the same buffer, reading a file in one
  754. window with \Name{C-X C-R} probably does not do what you want.
  755. \Nameitem{C-X 1}
  756. This is the basic window destroying command. All windows but
  757. the current window are removed from the screen. The current window grows
  758. to fill the vacated screen space. Any argument is ignored.
  759. \Nameitem{C-X N}
  760. Move to the next window down the screen. If the current window
  761. is the bottom window, move to the top window. Ignores any argument.
  762. \Nameitem{C-X P}
  763. Move to the previous window up the screen. If the current window
  764. is the top window, move to the bottom window. Ignores any argument.
  765. \Nameitem{C-X Z}
  766. The current window is enlarged, if possible. Any argument is
  767. used as a ``number of lines by which to grow''. The default argument is 1.
  768. Screen space is stolen from the window immediately below the current
  769. window. If the current window is the bottom window on the screen then
  770. space is stolen from the window immediately above the current window.
  771. You cannot steal all of the lines away from a window.
  772. \Nameitem{C-X C-N}
  773. Scroll the current window down. Any argument is used as a
  774. ``number of lines by which to scroll'' count. The default argument is 1.
  775. \Nameitem{C-X C-P}
  776. Scroll the current window up. Any argument is used as a
  777. ``number of lines by which to scroll'' count. The default argument is 1.
  778. \Nameitem{C-X C-Z}
  779. The current window is shrunk, if possible. Any argument is
  780. used as a ``number of lines by which to shrink''. The default argument is 1.
  781. Screen space is given to the window immediately below the current window.
  782. If the current window is the bottom window on the screen, the space is
  783. given to the window immediately above the current window. You cannot shrink
  784. a window out of existance.
  785. \Nameitem{M-!}
  786. This command is used to control the line of a window upon
  787. which dot is displayed. If its argument is positive, then that number is
  788. taken to be the origin 1 line number of the current window upon which
  789. the line containing dot should be placed. If its argument is 0, then dot
  790. is moved to the center of the window. If the number is less then zero
  791. then it is taken to be the negation of the origin 1 line number of the
  792. current window starting at the bottom upon which the line containing dot
  793. should be placed. If no argument is supplied, a default argument of 1 is
  794. used; This lets \Name{M-!} function as a ``move dot to the top of the window''
  795. command, which is very useful.
  796. \end{cmdlist}
  797. \section{Building a MicroEMACS}
  798. All versions of MicroEMACS are built from the same set of
  799. source files. Compile time options are selected by setting compilation
  800. switches in \Text{ed.h}, and then letting conditional compilation do the
  801. right thing.
  802. \subsection{Operating System}
  803. The three switches VMS, CPM, and MSDOS select the operating system.
  804. Only one of these switches should be set to \Text{1} at any time. If you set
  805. more than one of them to \Text{1}, you will get errors when you compile.
  806.  
  807. To date, only the \Text{termio.c} (low level terminal I/O) and \Text{spawn.c}
  808. (subjob creation) contain code conditionalized on the operating system.
  809. Adding a new operating system consists mostly of adding the appropriate
  810. magic incantations to these two files.
  811. \subsection{Terminal Support}
  812. MicroEMACS currently supports two kinds of terminals. The \Text{ANSI}
  813. compilation switch selects support for ANSI compatable terminals. The
  814. \Text{VT52} compilation switch selects support for VT52 like terminals (this
  815. includes the Zenith Z19). You should not set both of these.
  816.  
  817. The \Text{VT100} and \Text{LK201} compilation switches,
  818. if \Text{1}, select keyboard
  819. handling appropriate to VT100 and LK201 keyboards, respectfully. The
  820. LK201 support has only been tested on the Rainbow.
  821.  
  822. The \Text{RAINBOW} compilation switch, when set, modifies the display
  823. code to use fast video.
  824. A special routine, written in assembler, copies data from the MicroEMACS
  825. screen image directly into video RAM. This routine is guaranteed to
  826. do bad things on anything but a Rainbow. On the Rainbow, you still need
  827. to set \Text{ANSI}, and you will want to set \Text{LK201}.
  828. \subsection{Randomness}
  829. In ITS EMACS, arguments on the \Name{C-V}
  830. and \Name{M-V} commands work in lines. In
  831. Gosling EMACS, arguments on the \Name{C-V}
  832. and \Name{M-V} commands work in screens.
  833. The \Text{CVMVAS} compilation switch, if \Text{1}, makes the commands work
  834. like in Gosling EMACS.
  835. \end{document}
  836. SHAR_EOF
  837. if test 36749 -ne "`wc -c < 'uemacs.tex'`"
  838. then
  839.     echo shar: error transmitting "'uemacs.tex'" '(should have been 36749 characters)'
  840. fi
  841. fi
  842. exit 0
  843. #    End of shell archive
  844.